/**

 */
import request from "./require.js"
//用户登陆
export function login(data) {
	return request.request({
		url: 'api/user/login',
		method: 'POST',
		data: data,
  header: {
  	'Content-type': 'application/x-www-form-urlencoded',
  },
		custom:{
			auth:false,
		},
		
	});
}

// 新增走访人
export function addVillager(data) {
	return request.request({
		url: '/api/villagers/addVillager',
		method: 'POST',
		data: data,
  header: {
  	'Content-type': 'application/x-www-form-urlencoded',
  },
		custom:{
			auth:true,
		},
		
	});
}
// 普通走访人首页
export function allVillagerList (data) {
	return request.request({
		url: '/api/villagers/allVillagerList',
		method: 'POST',
		data: data,
  header: {
  	'Content-type': 'application/x-www-form-urlencoded',
  },
		custom:{
			auth:true,
		},
		
	});
}
// 用户信息
export function userinfo (data) {
	return request.request({
		url: '/api/user/index ',
		method: 'POST',
		data: data,
  header: {
  	'Content-type': 'application/x-www-form-urlencoded',
  },
		custom:{
			auth:true,
		},
		
	});
}

// 我的页面
export function my(data) {
	return request.request({
		url: '/api/user/my',
		method: 'POST',
		data: data,
  header: {
  	'Content-type': 'application/x-www-form-urlencoded',
  },
		custom:{
			auth:true,
		},
		
	});
}

//系统消息列表
export function noticeList (data) {
	return request.request({
		url: '/api/user/noticeList',
		method: 'POST',
		data: data,
  header: {
  	'Content-type': 'application/x-www-form-urlencoded',
  },
		custom:{
			auth:true,
		},
		
	});
}

//  图片上传
export function fileUpload(data) {
	return request.request({
		url: '/api/upload/fileUpload',
		method: 'POST',
		data: data,
		header: {
			'Content-type': 'application/x-www-form-urlencoded',
		},
		custom:{
			auth:true,
		},
		
	});
}

// 回访列表
export function visitList (data) {
	return request.request({
		url: '/api/villagers/visitList',
		method: 'POST',
		data: data,
		header: {
			'Content-type': 'application/x-www-form-urlencoded',
		},
		custom:{
			auth:true,
		},
	});
}

// 回访详情
export function visitDetail(data) {
	return request.request({
		url: '/api/villagers/visitDetail',
		method: 'POST',
		data: data,
		header: {
			'Content-type': 'application/x-www-form-urlencoded',
		},
		custom:{
			auth:true,
		},
	});
}

// 获取省市区村
export function getCityList (data) {
	return request.request({
		url: '/api/villagers/getCityList',
		method: 'POST',
		data: data,
		header: {
			'Content-type': 'application/x-www-form-urlencoded',
		},
		custom:{
			auth:true,
		},
	});
}

// 普通走访人-终止回访
export function stopVisit  (data) {
	return request.request({
		url: '/api/villagers/stopVisit',
		method: 'POST',
		data: data,
		header: {
			'Content-type': 'application/x-www-form-urlencoded',
		},
		custom:{
			auth:true,
		},
	});
}

// 普通走访人-添加回访记录(历史回访记录)
export function addvillagersRecord(data) {
	return request.request({
		url: '/api/villagers/addvillagersRecord',
		method: 'POST',
		data: data,
		header: {
			'Content-type': 'application/x-www-form-urlencoded',
		},
		custom:{
			auth:true,
		},
	});
}

//村支书首页(仅限村支书)
export function villageheadIndex(data) {
	return request.request({
		url: '/api/villagers/villageheadIndex',
		method: 'POST',
		data: data,
		header: {
			'Content-type': 'application/x-www-form-urlencoded',
		},
		custom:{
			auth:true,
		},
	});
}

// 村支书批量审核(仅限村支书)
export function villageheadCheck (data) {
	return request.request({
		url: '/api/villagers/villageheadCheck',
		method: 'POST',
		data: data,
		header: {
			'Content-type': 'application/x-www-form-urlencoded',
		},
		custom:{
			auth:true,
		},
	});
}

